/*
 * XML Type:  XMenu
 * Namespace: http://www.seedwill.com/xul/widget/
 * Java type: com.seedwill.xul.widget.XMenu
 *
 * Automatically generated - do not modify.
 */
package com.seedwill.xul.widget.impl;
/**
 * An XML XMenu(@http://www.seedwill.com/xul/widget/).
 *
 * This is a complex type.
 */
public class XMenuImpl extends com.seedwill.xul.core.impl.XIdentifiedImpl implements com.seedwill.xul.widget.XMenu
{
    private static final long serialVersionUID = 1L;
    
    public XMenuImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName TITLE$0 = 
        new javax.xml.namespace.QName("", "title");
    private static final javax.xml.namespace.QName HOTKEY$2 = 
        new javax.xml.namespace.QName("", "hotkey");
    private static final javax.xml.namespace.QName ICON$4 = 
        new javax.xml.namespace.QName("", "icon");
    private static final javax.xml.namespace.QName CHILDREN$6 = 
        new javax.xml.namespace.QName("", "children");
    private static final javax.xml.namespace.QName ASSEPARATOR$8 = 
        new javax.xml.namespace.QName("", "asSeparator");
    private static final javax.xml.namespace.QName HIDDEN$10 = 
        new javax.xml.namespace.QName("", "hidden");
    private static final javax.xml.namespace.QName DISABLED$12 = 
        new javax.xml.namespace.QName("", "disabled");
    private static final javax.xml.namespace.QName ACTION$14 = 
        new javax.xml.namespace.QName("", "action");
    private static final javax.xml.namespace.QName CONTEXTED$16 = 
        new javax.xml.namespace.QName("", "contexted");
    private static final javax.xml.namespace.QName CATE$18 = 
        new javax.xml.namespace.QName("", "cate");
    private static final javax.xml.namespace.QName TIP$20 = 
        new javax.xml.namespace.QName("", "tip");
    private static final javax.xml.namespace.QName TYPE$22 = 
        new javax.xml.namespace.QName("", "type");
    
    
    /**
     * Gets the "title" element
     */
    public java.lang.String getTitle()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TITLE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "title" element
     */
    public org.apache.xmlbeans.XmlString xgetTitle()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TITLE$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "title" element
     */
    public void setTitle(java.lang.String title)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TITLE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TITLE$0);
            }
            target.setStringValue(title);
        }
    }
    
    /**
     * Sets (as xml) the "title" element
     */
    public void xsetTitle(org.apache.xmlbeans.XmlString title)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TITLE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(TITLE$0);
            }
            target.set(title);
        }
    }
    
    /**
     * Gets the "hotkey" element
     */
    public java.lang.String getHotkey()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(HOTKEY$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "hotkey" element
     */
    public org.apache.xmlbeans.XmlString xgetHotkey()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(HOTKEY$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "hotkey" element
     */
    public void setHotkey(java.lang.String hotkey)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(HOTKEY$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(HOTKEY$2);
            }
            target.setStringValue(hotkey);
        }
    }
    
    /**
     * Sets (as xml) the "hotkey" element
     */
    public void xsetHotkey(org.apache.xmlbeans.XmlString hotkey)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(HOTKEY$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(HOTKEY$2);
            }
            target.set(hotkey);
        }
    }
    
    /**
     * Gets the "icon" element
     */
    public java.lang.String getIcon()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ICON$4, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "icon" element
     */
    public org.apache.xmlbeans.XmlString xgetIcon()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(ICON$4, 0);
            return target;
        }
    }
    
    /**
     * Sets the "icon" element
     */
    public void setIcon(java.lang.String icon)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ICON$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ICON$4);
            }
            target.setStringValue(icon);
        }
    }
    
    /**
     * Sets (as xml) the "icon" element
     */
    public void xsetIcon(org.apache.xmlbeans.XmlString icon)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(ICON$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(ICON$4);
            }
            target.set(icon);
        }
    }
    
    /**
     * Gets array of all "children" elements
     */
    public com.seedwill.xul.widget.XMenu[] getChildrenArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(CHILDREN$6, targetList);
            com.seedwill.xul.widget.XMenu[] result = new com.seedwill.xul.widget.XMenu[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "children" element
     */
    public com.seedwill.xul.widget.XMenu getChildrenArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XMenu target = null;
            target = (com.seedwill.xul.widget.XMenu)get_store().find_element_user(CHILDREN$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "children" element
     */
    public int sizeOfChildrenArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CHILDREN$6);
        }
    }
    
    /**
     * Sets array of all "children" element
     */
    public void setChildrenArray(com.seedwill.xul.widget.XMenu[] childrenArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(childrenArray, CHILDREN$6);
        }
    }
    
    /**
     * Sets ith "children" element
     */
    public void setChildrenArray(int i, com.seedwill.xul.widget.XMenu children)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XMenu target = null;
            target = (com.seedwill.xul.widget.XMenu)get_store().find_element_user(CHILDREN$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(children);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "children" element
     */
    public com.seedwill.xul.widget.XMenu insertNewChildren(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XMenu target = null;
            target = (com.seedwill.xul.widget.XMenu)get_store().insert_element_user(CHILDREN$6, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "children" element
     */
    public com.seedwill.xul.widget.XMenu addNewChildren()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XMenu target = null;
            target = (com.seedwill.xul.widget.XMenu)get_store().add_element_user(CHILDREN$6);
            return target;
        }
    }
    
    /**
     * Removes the ith "children" element
     */
    public void removeChildren(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CHILDREN$6, i);
        }
    }
    
    /**
     * Gets the "asSeparator" element
     */
    public boolean getAsSeparator()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ASSEPARATOR$8, 0);
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "asSeparator" element
     */
    public org.apache.xmlbeans.XmlBoolean xgetAsSeparator()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(ASSEPARATOR$8, 0);
            return target;
        }
    }
    
    /**
     * Sets the "asSeparator" element
     */
    public void setAsSeparator(boolean asSeparator)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ASSEPARATOR$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ASSEPARATOR$8);
            }
            target.setBooleanValue(asSeparator);
        }
    }
    
    /**
     * Sets (as xml) the "asSeparator" element
     */
    public void xsetAsSeparator(org.apache.xmlbeans.XmlBoolean asSeparator)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(ASSEPARATOR$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlBoolean)get_store().add_element_user(ASSEPARATOR$8);
            }
            target.set(asSeparator);
        }
    }
    
    /**
     * Gets the "hidden" element
     */
    public boolean getHidden()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(HIDDEN$10, 0);
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "hidden" element
     */
    public org.apache.xmlbeans.XmlBoolean xgetHidden()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(HIDDEN$10, 0);
            return target;
        }
    }
    
    /**
     * Sets the "hidden" element
     */
    public void setHidden(boolean hidden)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(HIDDEN$10, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(HIDDEN$10);
            }
            target.setBooleanValue(hidden);
        }
    }
    
    /**
     * Sets (as xml) the "hidden" element
     */
    public void xsetHidden(org.apache.xmlbeans.XmlBoolean hidden)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(HIDDEN$10, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlBoolean)get_store().add_element_user(HIDDEN$10);
            }
            target.set(hidden);
        }
    }
    
    /**
     * Gets the "disabled" element
     */
    public boolean getDisabled()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DISABLED$12, 0);
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "disabled" element
     */
    public org.apache.xmlbeans.XmlBoolean xgetDisabled()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(DISABLED$12, 0);
            return target;
        }
    }
    
    /**
     * Sets the "disabled" element
     */
    public void setDisabled(boolean disabled)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DISABLED$12, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DISABLED$12);
            }
            target.setBooleanValue(disabled);
        }
    }
    
    /**
     * Sets (as xml) the "disabled" element
     */
    public void xsetDisabled(org.apache.xmlbeans.XmlBoolean disabled)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(DISABLED$12, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlBoolean)get_store().add_element_user(DISABLED$12);
            }
            target.set(disabled);
        }
    }
    
    /**
     * Gets the "action" element
     */
    public com.seedwill.xul.widget.XAction getAction()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XAction target = null;
            target = (com.seedwill.xul.widget.XAction)get_store().find_element_user(ACTION$14, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "action" element
     */
    public void setAction(com.seedwill.xul.widget.XAction action)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XAction target = null;
            target = (com.seedwill.xul.widget.XAction)get_store().find_element_user(ACTION$14, 0);
            if (target == null)
            {
                target = (com.seedwill.xul.widget.XAction)get_store().add_element_user(ACTION$14);
            }
            target.set(action);
        }
    }
    
    /**
     * Appends and returns a new empty "action" element
     */
    public com.seedwill.xul.widget.XAction addNewAction()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XAction target = null;
            target = (com.seedwill.xul.widget.XAction)get_store().add_element_user(ACTION$14);
            return target;
        }
    }
    
    /**
     * Gets the "contexted" element
     */
    public boolean getContexted()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CONTEXTED$16, 0);
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "contexted" element
     */
    public org.apache.xmlbeans.XmlBoolean xgetContexted()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(CONTEXTED$16, 0);
            return target;
        }
    }
    
    /**
     * Sets the "contexted" element
     */
    public void setContexted(boolean contexted)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CONTEXTED$16, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CONTEXTED$16);
            }
            target.setBooleanValue(contexted);
        }
    }
    
    /**
     * Sets (as xml) the "contexted" element
     */
    public void xsetContexted(org.apache.xmlbeans.XmlBoolean contexted)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(CONTEXTED$16, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlBoolean)get_store().add_element_user(CONTEXTED$16);
            }
            target.set(contexted);
        }
    }
    
    /**
     * Gets the "cate" element
     */
    public com.seedwill.xul.widget.XMenuCate getCate()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XMenuCate target = null;
            target = (com.seedwill.xul.widget.XMenuCate)get_store().find_element_user(CATE$18, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "cate" element
     */
    public void setCate(com.seedwill.xul.widget.XMenuCate cate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XMenuCate target = null;
            target = (com.seedwill.xul.widget.XMenuCate)get_store().find_element_user(CATE$18, 0);
            if (target == null)
            {
                target = (com.seedwill.xul.widget.XMenuCate)get_store().add_element_user(CATE$18);
            }
            target.set(cate);
        }
    }
    
    /**
     * Appends and returns a new empty "cate" element
     */
    public com.seedwill.xul.widget.XMenuCate addNewCate()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XMenuCate target = null;
            target = (com.seedwill.xul.widget.XMenuCate)get_store().add_element_user(CATE$18);
            return target;
        }
    }
    
    /**
     * Gets the "tip" element
     */
    public java.lang.String getTip()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TIP$20, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "tip" element
     */
    public org.apache.xmlbeans.XmlString xgetTip()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TIP$20, 0);
            return target;
        }
    }
    
    /**
     * Sets the "tip" element
     */
    public void setTip(java.lang.String tip)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TIP$20, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TIP$20);
            }
            target.setStringValue(tip);
        }
    }
    
    /**
     * Sets (as xml) the "tip" element
     */
    public void xsetTip(org.apache.xmlbeans.XmlString tip)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TIP$20, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(TIP$20);
            }
            target.set(tip);
        }
    }
    
    /**
     * Gets the "type" element
     */
    public java.lang.String getType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TYPE$22, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "type" element
     */
    public org.apache.xmlbeans.XmlString xgetType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TYPE$22, 0);
            return target;
        }
    }
    
    /**
     * Sets the "type" element
     */
    public void setType(java.lang.String type)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TYPE$22, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TYPE$22);
            }
            target.setStringValue(type);
        }
    }
    
    /**
     * Sets (as xml) the "type" element
     */
    public void xsetType(org.apache.xmlbeans.XmlString type)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TYPE$22, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(TYPE$22);
            }
            target.set(type);
        }
    }
}
